1. Field of the Invention
The present invention relates to a bar code image processing apparatus which is capable of identifying the position and the direction of a bar code when reading and decoding a bar code from a document (e.g., mail) image including letters, figures and patterns.
2. Prior Art
Bar codes are widely used for many purposes in various fields. FIG. 11 shows a conventional bar code reading technique, disclosed in Unexamined Japanese Patent Application No. 2-125386 (published in 1990), which enters a two-dimensional image of an object, extracts each bar code region involved in the entered image through image processing, and decodies a bar code.
More specifically, in an image processing arrangement shown in FIG. 11, image data are entered through an input terminal 901 into a binary coding section 903 in which the entered image data are changed into binary data. A binary level variation detecting section 904 converts the binary data into a contour image. A black expanding section 905 unites the periodically aligned contour lines of the bar code and paints out the bar code region. Next, a black contracting section 906 erases the background and extracts the bar code region. Numeral 907 represents a regressive straight line calculating section, numeral 908 represents a reading coordinate calculating section, numeral 902 represents an image signal memory section, and reference numeral 909 represents a bar code decoding section. Thus, along a regressive straight line of the extracted region, the image data are read and decoded.
However, according to the above-described conventional bar code image processing apparatus, it is difficult to correctly separate the bar code region from the background image when the length of a bar is short in comparison with a bar pitch.